package com.zhida.chatservice.service;

import com.fasterxml.jackson.core.JsonProcessingException;
import com.zhida.common.entity.Announcement;
import com.baomidou.mybatisplus.extension.service.IService;
import com.zhida.common.entity.Result;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author ling
 * @since 2024-07-23
 */
@Service
public interface IAnnouncementService extends IService<Announcement> {

    Result<?> createAnnouncement(Announcement announcement);

    Result<?> deleteAnnouncement(@PathVariable Integer id);
    Result<?> getAnnouncementById(Integer id) throws JsonProcessingException;

    Result<?> updateAnnouncement(Announcement announcement);

    Result<?> pushAnnouncement(Integer id);

    Result<?> getLatestAnnouncement(Integer group_id);
}
